<template>
  <div>
    <h1>这是我的根组件</h1>
    <Header></Header>
    <ul>
      <li v-for="(item, index) in info" :key="index">{{ item }}</li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";
import Header from "./components/Header.vue";
export default {
  name: "nihao",
  components: { Header },
  data() {
    return {
      info: {},
    };
  },
  mounted() {
    // axios({
    //   url: "/api/bigboss",
    //   method: "get",
    // }).then((value) => {
    //   this.info = value.data.hobby;
    // });
    axios.get("/api/bigboss").then((value) => {
      this.info = value.data.hobby;
    });
  },
};
</script>

<style lang="less" scoped></style>
